package com.phpxiu.app.supports.qq;

import android.text.TextUtils;

/**
 * @file
 * @brief 授权成功后获取的QQ用户信息
 * @author 吴金洲
 * @note  授权成功后获取的QQ用户信息
 *
 */
public class QQUserInfo {
    private String nickname;//昵称
    private String gender;//性别值为“男”或“女”
    private String province;//现居省份
    private String city;//现居城市
    private String figureurl_qq_1;//50像素宽高的QQ头像图片url
    private String figureurl_qq_2;//100像素宽高的QQ头像图片url
    private String figureurl_1;//50像素宽高的QQ空间头像图片url
    private String figureurl_2;//100像素宽高的QQ空间头像图片url

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getFigureurl_qq_1() {
        return figureurl_qq_1;
    }

    public void setFigureurl_qq_1(String figureurl_qq_1) {
        this.figureurl_qq_1 = figureurl_qq_1;
    }

    public String getFigureurl_qq_2() {
        return figureurl_qq_2;
    }

    public void setFigureurl_qq_2(String figureurl_qq_2) {
        this.figureurl_qq_2 = figureurl_qq_2;
    }

    public String getFigureurl_1() {
        return figureurl_1;
    }

    public void setFigureurl_1(String figureurl_1) {
        this.figureurl_1 = figureurl_1;
    }

    public String getFigureurl_2() {
        return figureurl_2;
    }

    public void setFigureurl_2(String figureurl_2) {
        this.figureurl_2 = figureurl_2;
    }

    /**
     * 获取头像url
     */
    public String getAvatar(){
        if(!TextUtils.isEmpty(this.figureurl_qq_2)){
            return this.figureurl_qq_2;
        }else if(!TextUtils.isEmpty(this.figureurl_qq_1)){
            return this.figureurl_qq_1;
        }else if(!TextUtils.isEmpty(this.figureurl_2)){
            return this.figureurl_2;
        }else if(!TextUtils.isEmpty(this.figureurl_1)){
            return this.figureurl_1;
        }else {
            return null;
        }
    }
}
